home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / cli / FileComment.lha / setver.sh < prev   
Text File  |  1995-01-02  |  626b  |  29 lines

  1. #csh
  2. #
  3. # Use C:Version command to set file-note of indicated files
  4. # with the version string of the file.
  5.  
  6. foreach i ( $_passed ) {
  7.    set return  = `C:Version FILE $i FULL`
  8.    set thever  = @word( $return 3 )
  9.    set version = @delword( $return 1 )
  10.    if $thever == "find" then
  11.       set version = \"?.?\"
  12.    endif
  13.    set vernum = @word( $version 1 )
  14.    if ( $vernum > 0) then
  15.       echo -n v$version >T:vers.tmp
  16.    else
  17.       echo -n $return >T:vers.tmp
  18.    endif
  19.    echo -n "File: "$i" - "
  20.    cat T:vers.tmp
  21.    Work:c/FileComment $i <T:vers.tmp
  22.    rm T:vers.tmp
  23. }
  24. unset vernum
  25. unset version
  26. unset thever
  27. unset return
  28. unset i
  29.